package cn.cstech.aijia.ui.base.fragments;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import cn.cstech.aijia.R;
import cn.cstech.aijia.ui.base.BaseFragment;
import cn.cstech.aijia.ui.base.views.MineMenuItem;
import cn.cstech.aijia.ui.service.CompanyListActivity;
import cn.cstech.aijia.ui.service.DesignerListActivity;

/**
 * Created with Android Studio.
 * Title:ServiceFragment
 * Description:
 * Copyright:Copyright (c) 2014
 * Company:中国平安健康保险有限公司
 * Author:Alice
 * Date:15/9/5
 * Time:上午9:58
 * Version 1.0
 */
public class ServiceFragment extends BaseFragment{
    @Override
    public View onCreateViewCustom(LayoutInflater inflater, ViewGroup container) {
        View view = inflater.inflate(R.layout.fg_service, null);
        initViews(view);
        return view;
    }

    @Override
    public void onTitleBarCreate(){
        setTitleText("服务");
    }


    private MineMenuItem serviceItem;
    private MineMenuItem menu_bao;
    private RelativeLayout design_rl;
    private RelativeLayout company_rl;

    private void initViews(View v){
        serviceItem = (MineMenuItem) v.findViewById(R.id.menu_service);
        serviceItem.initItem(R.drawable.icon_yanfang,R.string.label_service_chat,-1);

        menu_bao =(MineMenuItem) v.findViewById(R.id.menu_bao);
        menu_bao.initItem(R.drawable.icon_zxb,R.string.label_service_bao,-1);


        design_rl = (RelativeLayout) v.findViewById(R.id.design_rl);
        design_rl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), DesignerListActivity.class));
            }
        });
        company_rl = (RelativeLayout) v.findViewById(R.id.company_rl);
        company_rl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), CompanyListActivity.class));

            }
        });
    }
}
